🏬 Sales Analysis¶

🎯 Goals:¶

In this analysis, we will examine how different brands performed in terms of sales and explore which characteristics may have contributed to their overall success. We will use various visualizations to better understand and identify key trends.

To gain these insights, we will follow seven crucial steps:

  • Import the necessary libraries as tools for our analysis

  • Filter the data to include only the categories required for this study (‘Laptops’, ‘Smartphones’, and ‘Tablets’)

  • Calculate total revenue per brand and visualize it using a pie chart

  • Analyze the number of units sold per brand through a line chart

  • Display the distribution of ratings across different brands with a combination of histogram and boxplot

  • Explore the correlation between ratings and units sold using a scatterplot

After each step, provide a brief summary and conclusion of the findings to help track the emerging trends

Step 1: Importing the Necessary Libraries and Showing Sample Data¶

product_name category price quantity_in_stock quantity_sold brand rating num_of_ratings date_added color revenue
0 iPad mini (2021) (64GB, Blue) Tablets 499.00 266.0 807.0 Apple 8.75 151.0 2/2/2022 blue 402693.00
1 K55 RGB (Red) Keyboards 49.99 0.0 1117.0 Corsair 8.50 455.0 8/14/2022 red 55838.83
2 Fenix 7 (Purple) Watches 699.99 0.0 530.0 Garmin 9.20 305.0 4/20/2022 purple 370994.70
3 Mate 40 (256GB, Orange) Smartphones 899.00 182.0 1030.0 Huawei 8.50 500.0 10/23/2024 orange 925970.00
4 Rival 600 (Red) Mice 79.99 35.0 1439.0 SteelSeries 9.25 556.0 9/29/2020 red 115105.61

Step 2: Creating the Filtered Data Frame¶

In this step, we will extract only the rows with specific categories: "Laptops", "Tablets", and "Smartphones". This way, we are creating a customized DataFrame tailored to the given requirements.

Step 3: Calculating Total Income per Brand¶

In this step we are going to group data by category, in order to calculate total income (using sum() method). Then we are going to name these new columns: 'category' and 'revenue' respectively. This serves as a point of reference when creating names and values for a pie chart.

The pie chart clearly highlights the dominance of the Apple brand, which holds a 23.6% share of total revenue across the selected product categories. It is followed by Lenovo (12.2%), Samsung (11.9%), Asus (10.2%), Dell (9.22%), HP (8.55%), Huawei (8.19%), and Microsoft (7.86%). OnePlus (4.78%) and Xiaomi (3.43%) make up smaller but still notable portions of the market.

This distribution indicates strong competition among the leading brands, with Apple maintaining a significant lead—likely due to a combination of high product prices, strong brand loyalty, and a broad presence across product categories. The substantial shares of brands like Lenovo, Samsung, and Asus suggest consistent consumer demand and potentially a wider range of offerings in high-performing segments.

While the chart does not directly specify which product category contributes most to the revenue, the prominent presence of laptop-focused brands (such as Lenovo, Dell, and HP) may imply that laptops are the most profitable category. It may be worth further exploring whether the lower revenue shares of certain brands are due to limited product range, weaker brand recognition, or a focus on more budget-friendly devices.

Step 4: Which Brand Is in Highest Demand?¶

In this step, using the line chart, we are going to examine which product is in the highest demand (in terms of units sold).

In this graph, we can clearly analyze the sales peak of each brand in the store. Samsung had the highest number of units sold in November 2022, reaching 5,329 units. OnePlus excelled in October 2022 with a total of 3,143 units sold. Microsoft peaked in December 2025 with 3,151 units sold, and Lenovo reached its highest sales in June 2020 with 4,004 units. Huawei had its peak in August 2024 with 5,136 units sold, while Dell recorded its highest sales in September 2024 with 2,169 units. Asus peaked in January 2020 with 3,361 units sold, and Apple made a record of 7,131 units sold in October 2022. HP had its best month in January 2022 with 3,252 units sold, and Xiaomi achieved its peak in June 2022 with 4,818 units sold. The highest selling brands based on their peak monthly sales are: Apple – 7,131 units (October 2022)

Samsung – 5,329 units (November 2022)

Huawei – 5,136 units (August 2024)

Xiaomi – 4,818 units (June 2022)

Lenovo – 4,004 units (June 2020)

We could further delve into the possible causes of the bolded sales peaks.

Step 5: Ratings by Brands¶

In this section, using the histogram and boxplot, we are looking to explore how exactly ratings are distributed among the three categories.

The rating analysis reveals that Apple leads with the highest maximum rating (9.7) and a relatively wide spread, indicating strong overall user satisfaction but also some variability. Most other brands, including Dell, Asus, HP, Microsoft, Samsung, OnePlus, Xiaomi, and Lenovo, show consistent and positive ratings clustered around medians between 8.2 and 8.5, reflecting steady customer approval.

Brands like Huawei and Samsung have somewhat broader rating ranges, suggesting more diverse user experiences. The tight interquartile ranges (Q1 to Q3) of most brands indicate general agreement among users about product quality.

Overall, Apple stands out for top-end excellence, while the other brands maintain reliable, favorable reputations. This suggests marketing and product focus could leverage Apple’s premium image and explore improving variability in brands with wider rating spreads.

Step 6: Discovering the Correlation between Price and Quantity Sold¶

A relatively flat trendline (or trendlines) shows that sales quantity doesn’t strongly depend on price overall, but the clustering of many points at lower prices indicates most customers prefer more affordable products. However, it is worth noting that the product “iPhone 12 (256 GB, Silver)” made a striking 3,596 sales, with the price being on the lower end compared to other products in the store. This suggests it is a high-quality product that meets customers’ expectations while remaining relatively affordable.

📌 Conclusion:¶

After defining our goals, it is now time for bringing forth some of the most important conclusions we have drawn from this analysis.

  1. The interactive analysis of sales and ratings across product categories -smartphones,laptops and tablets reveals that Apple consistently leads both in meeting customers needs and sales volume peaking at 7.131 units sold in a month. Other strong performers include Samsung, Huawei,Xiaomi and Lenovo, each reaching notable monthly sale between 4.000-5.300 units
  2. Most brands show consistently high customer ratings, typically clustered between 8.2-8.75, with low variability, suggesting overall user satisfaction across the market. Apple again stands out with both highest maximum ratings (9.7) and a broader spread, indicating a premium perception with some diverse feedback.
  3. The price vs quantity sold analysis shows that while higher prices don't necessarily reduce sales, most sold products are sold in the lower price range, implying that affordability plays a major role in consumer decisions. Notably, products like the iPhone 12 (256 GB, Silver) combine affordability with high appeal, resulting in exceptionally high sales.

These insights suggest that the marketing efforts should leverage top-performing, high-rated products like Apple's, while exploring causes behind peak monthly sales for each brand to optimize future campaigns. Additionaly, the store could focus on maintaining quality and competitive prices for consistently rated mid-range brands